package com.wlyuan.open.scanner.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wlyuan.open.scanner.dao.entity.OrderGoodsKidsKingDO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author yuanjie
 * @since 2022-11-23
 */
public interface OrderGoodsKidsKingMapper extends BaseMapper<OrderGoodsKidsKingDO> {


    @Select("SELECT top 1 GoodsLst_ID, opt_status, GoodsLst_OrderID, GoodsLst_GoodsID, GoodsLst_Code, GoodsLst_Name, GoodsLst_Qty, GoodsLst_Weight, GoodsLst_Volume, GoodsLst_ReceiptQty, GoodsLst_ExceptionQty, GoodsLst_Creator, GoodsLst_InsertTime, " +
            "GoodsLst_Updater, GoodsLst_UpdateTime, GoodsLst_Invalid, GoodsLst_Comments, GoodsLst_Unit, GoodsLst_BatchNo, GoodsLst_Price, GoodsLst_NoTaxUnitPrice, GoodsLst_NoTaxPrice, GoodsLst_TaxPrice, GoodsLst_TotalPrice, " +
            "GoodsLst_ExceptionQtyTemp, GoodsLst_ExceptionType, GoodsLst_ReceiptQty_v, GoodsLst_ExceptionQty_v, GoodsLst_ExceptionType_v, GoodsLst_NOid, GoodsLst_RefusedNo, GoodsLsr_KBETR_WS, GoodsLst_MWSBP_ZK, GoodsLst_MWSBP, GoodsLst_KBETR, " +
            "GoodsLst_LackQty, GoodsLst_LoseQty, GoodsLst_DamageQty, GoodsLst_OtherQty, GoodsLst_ExceptionDesc, GoodsLst_LackQty_v, GoodsLst_LoseQty_v, GoodsLst_DamageQty_v, GoodsLst_OtherQty_v, GoodsLst_ExceptionDesc_v, GoodsLst_exceptionTag, GoodsLst_Spc, " +
            "GoodsLst_BarCode, GoodsLst_SinglePrice, GoodsLst_SingleWeight, GoodsLst_SingleVolume, GoodsLst_FactoryNo, GoodsLst_ExtendDoc1, GoodsLst_echo " +
            "FROM WLY.dbo.TMS_OrderGoods_KidsKing " +
            "WHERE GoodsLst_OrderID = #{orderId} and GoodsLst_Invalid = 0 ")
    OrderGoodsKidsKingDO getByOrderId(@Param("orderId") Long orderId);

}
